package com.mjw.tender.mapper;

import com.mjw.tender.domain.Article;
import com.mjw.tender.domain.Favourite;
import com.mjw.tender.tk.mybatis.mapper.MyMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ArticleMapper extends MyMapper<Article> {
    List<Article> selectListByArticle(Article article);

    int increaseBrowse(Long id);

    int increaseLikeOrCollect(@Param("id") Long articleId, @Param("actionType") Short actionType);

    List<Article> getFavouriteArticle(Long userId);

    List<Article> getLikeArticle(Long userId);

    List<Article> getCollectArticle(Long userId);

    List<Article> selectOrderByBrowse(Integer num);
}